# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=grilo
pkgver=0.3.6
pkgrel=1
pkgdesc="Framework that provides access to various sources of multimedia content"
url="https://wiki.gnome.org/Projects/Grilo"
arch=(x86_64)
license=(LGPL)
depends=(gtk3 libxml2 libsoup liboauth totem-plparser)
makedepends=(gobject-introspection gtk-doc vala git meson)
optdepends=('grilo-plugins: Plugins for grilo')
_commit=6cd2e5e94f1ba2a8bf7c42da98523b3d76b5e298  # tags/grilo-0.3.6^0
source=("git+https://gitlab.gnome.org/GNOME/grilo.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^grilo-//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D enable-gtk-doc=true
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
